const path = require('path');
const htmlWebpackPlugin = require('html-webpack-plugin');
const webpack = require('webpack');
module.exports = { 
	entry: './main.js', 
	
	// 配置输出
	output: { 
		path: path.resolve(__dirname, 'dist'), 
		filename: 'superDemo.js'
		}, 
		plugins: [ 
		new htmlWebpackPlugin(),
		// 配置热更新
		new webpack.HotModuleReplacementPlugin()
		] ,
		mode: 'development',
		devServer: {
			// 根目录
			contentBase: path.join(__dirname,'dist'),
			compress: true,
			// 端口号
			port: 9000,
			// 配置热更新
			hot: true
		}
}





